package w14;

public class s03 {
	public static boolean isMing7(int n) {
		while(n>0) {
			int y=n%10;
			if(y==7)return true;
			n/=10;
		}
		return false;
	}
    public static boolean isAn7(int n) {
    	
    	return n%7==0;
	}
	public static void main(String[] args) {
		for(int i=1;i<70;++i) {
			if(isAn7(i)||isMing7(i))System.out.printf("%d ",i);
		}

	}

}
